package com.health.controller;

import com.health.common.Result;
import com.health.entity.InquiryOrder;
import com.health.entity.pojo.PageData;
import com.health.entity.pojo.dto.QueryInquiryOrderDTO;
import com.health.service.IInquiryOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 问诊订单 前端控制器
 * </p>
 *
 * @author fengjiaxing
 * @since 2023-04-19
 */
@RestController
@RequestMapping("/inquiryOrder")
public class InquiryOrderController extends BaseController{

    @Autowired
    private IInquiryOrderService inquiryOrderService;

    //分页查找问诊订单数据
    @PostMapping("/getPageAll/{pageNum}/{pageSize}")
    public Result<InquiryOrder> getPageAll(
                                           @PathVariable("pageNum") Integer pageNum,
                                           @PathVariable("pageSize") Integer pageSize,
                                           @RequestBody QueryInquiryOrderDTO queryInquiryOrderDTO){

       PageData pageData =  inquiryOrderService.getPageAll(pageNum,pageSize,queryInquiryOrderDTO);
       return Result.success(200,"查询问诊订单成功",pageData);
    }


}
